add_executable(channel_test Channel_test.cpp)
target_link_libraries(channel_test muduo_net)

if(BOOSTTEST_LIBRARY)
    message("find BOOSTTEST_LIBRARY")

    add_executable(buffer_unittest Buffer_unittest.cpp)
    target_link_libraries(buffer_unittest muduo_net boost_unit_test_framework)
    add_test(NAME buffer_unittest COMMAND buffer_unittest)

    add_executable(inetaddress_unittest InetAddress_unittest.cpp)
    target_link_libraries(inetaddress_unittest muduo_net boost_unit_test_framework)
    add_test(NAME inetaddress_unittest COMMAND inetaddress_unittest)
endif()

add_executable(eventloop_unittest EventLoop_unittest.cpp)
target_link_libraries(eventloop_unittest muduo_net)

add_executable(eventloopthread_unittest EventLoopThread_unittest.cpp)
target_link_libraries(eventloopthread_unittest muduo_net)

add_executable(eventloopthreadpool_unittest EventLoopThreadPool_unittest.cpp)
target_link_libraries(eventloopthreadpool_unittest muduo_net)

add_executable(boostany_unittest BoostAny_unittest.cpp)
target_link_libraries(boostany_unittest muduo_net)

add_executable(EchoServer_unittest EchoServer_unittest.cpp)
target_link_libraries(EchoServer_unittest muduo_net)

add_executable(EchoClient_unittest EchoClient_unittest.cpp)
target_link_libraries(EchoClient_unittest muduo_net)

add_executable(TimerQueue_unittest TimerQueue_unittest.cpp)
target_link_libraries(TimerQueue_unittest muduo_net)

add_executable(TcpClient_reg1 TcpClient_reg1.cpp)
target_link_libraries(TcpClient_reg1 muduo_net)

add_executable(TcpClient_reg2 TcpClient_reg2.cpp)
target_link_libraries(TcpClient_reg2 muduo_net)

add_executable(TcpClient_reg3 TcpClient_reg3.cpp)
target_link_libraries(TcpClient_reg3 muduo_net)
